package com.pig4cloud.pigx.shop.api.feign;

import com.pig4cloud.pigx.common.core.constant.SecurityConstants;
import com.pig4cloud.pigx.common.core.constant.ServiceNameConstants;
import com.pig4cloud.pigx.common.core.util.R;
import com.pig4cloud.pigx.shop.api.dto.GoodsMaterialDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteGoodsMaterialService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteGoodsMaterialService {

	/**
	 * 根据媒体库id列表获取图片路径
	 * @param goodsMaterialDTO
	 * @param from
	 * @return
	 */
	@PostMapping("/goods/material/convertImageIdToUrl")
	R<String> convertImageIdToUrl(@RequestBody GoodsMaterialDTO goodsMaterialDTO,
			@RequestHeader(SecurityConstants.FROM) String from);

}
